#ifndef YXIO_H
#define YXIO_H

#include "SDS.h"

#define READ_SUCCESS 1
#define READ_EXIT    0
#define READ_FAILED  -1
#define READ_AGAIN   -2
#define READ_UNABLE  -3

int read_line(int fd, sds buf);
int read_once(int fd, sds buf);
int read_all(int fd, sds *buf_ptr, int size);
int file_read_once(FILE *fp, sds buf);
int file_read_all(char *path, sds *buf_ptr);

#endif // YXIO_H
